-
Notifications
You must be signed in to change notification settings - Fork 621
[SDK] Fix updateListing date handling in marketplace direct listings #6628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDK] Fix updateListing date handling in marketplace direct listings #6628
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 22dc69a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
ba79d2d to
722da03
Compare
722da03 to
21f51ba
Compare
packages/thirdweb/src/extensions/marketplace/direct-listings/write/updateListing.ts
Outdated
Show resolved
Hide resolved
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (28.57%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6628 +/- ##
==========================================
+ Coverage 54.96% 54.97% +0.01%
==========================================
Files 887 888 +1
Lines 55652 55752 +100
Branches 3798 3817 +19
==========================================
+ Hits 30591 30652 +61
- Misses 24966 25005 +39
Partials 95 95
🚀 New features to boost your workflow:
|
21f51ba to
22dc69a
Compare
|
|
||
| if ( | ||
| startTimestamp !== mergedOptions.startTimeInSeconds && | ||
| startTimestamp <= lastestBlock.timestamp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a typo in the variable name lastestBlock which should be latestBlock. This typo occurs in multiple places throughout the conditional checks in the date validation logic.
| startTimestamp <= lastestBlock.timestamp | |
| startTimestamp <= latestBlock.timestamp |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.

Fixes TOOL-3924
PR-Codex overview
This PR focuses on fixing the handling of date timestamps in the
updateListingfunction within thethirdwebpackage, ensuring correct validation and assignment of start and end timestamps.Detailed summary
startTimestampandendTimestampassignment logic inupdateListing.tsto handle cases withmergedOptions.startTimestampis beforeendTimestamp.updateListingindirect-listings.test.ts.secondListingin the test to reflect the new price.